package arbori;

public abstract class Nod {
	protected Nod fStang;
	protected Nod fDrept;
	protected double x;
	public Nod getfStang() {
		return fStang;
	}
	public void setfStang(Nod fStang) {
		this.fStang = fStang;
	}
	public Nod getfDrept() {
		return fDrept;
	}
	public void setfDrept(Nod fDrept) {
		this.fDrept = fDrept;
	}
	public double getX() {
		return x;
	}
	public void setX(double x) {
		this.x = x;
		if(fStang!=null) fStang.setX(x);
		if(fDrept!=null) fDrept.setX(x);
	}
	
	public abstract double calcul();
	public abstract String derivare();
	public abstract double calculDerivata();
	public abstract String toString();
}
